In order to enrich and improve the ability of the existing models for reasoning and predicting with 3D cardinal direction relations and enhance the usability of the existing models, and then better meet the demands of real applications for complex 3D spatial data, the inverse reasoning of 3D cardinal direction relations was studied. After deeply studying the theory of n-dimensional block algebra, an algorithm for computing the inverse of the basic 3D cardinal direction relations on the basis of 3D block algebra was devised. Theoretical analysis and the results of the example show that the proposed algorithm is correct and complete. This work can better enhance the power of intelligent analysis and processing for the complex 3D direction relations of the spatial database.